Skip to content

feat(client): gate native backends behind Cargo features#1338

Merged
Benoît Cortier (CBenoit) merged 3 commits into
masterfrom
refactor/client-split
Jun 29, 2026
Merged

feat(client): gate native backends behind Cargo features#1338
Benoît Cortier (CBenoit) merged 3 commits into
masterfrom
refactor/client-split

Conversation

@CBenoit

@CBenoit Benoît Cortier (CBenoit) commented May 28, 2026

Copy link
Copy Markdown
Member

ironrdp (meta crate):

  • Added: client, client-all, client-sound, client-clipboard,
    client-rdpdr, client-smartcard, client-gateway,
    client-dvc-pipe-proxy, client-dvc-com-plugin, and
    top-level rustls / native-tls (forwarded to ironrdp-client)
  • Modified: qoi, qoiz now also gate ironrdp-client's codec

ironrdp-client:

  • Added: sound, clipboard, rdpdr, smartcard, gateway,
    dvc-pipe-proxy, dvc-com-plugin, all; optional
    subsystem crates are pulled in only via these features
  • Modified: default no longer forces rustls; rustls / native-tls
    stay mutually exclusive (exactly one required), and
    qoi / qoiz now point at ironrdp-connector / ironrdp-session

ironrdp-viewer:

  • Removed: direct ironrdp-client / backend-crate dependencies and
    qoi / qoiz features
  • Modified: rustls / native-tls now forward to ironrdp instead of
    ironrdp-client; pulls client + client-all from the meta crate

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors ironrdp-client to make protocol/native backends opt-in via Cargo features (no default features) and introduces a typed Config/ConfigBuilder API, while moving .rdp/CLI parsing responsibilities into the viewer frontend.

Changes:

  • Add Config, Features, and ConfigBuilder in ironrdp-client, including runtime feature gates (with_sound(bool), with_clipboard(bool), etc.).
  • Gate optional channel wiring (sound/clipboard/rdpdr/gateway/DVC integrations) behind Cargo features in the client engine.
  • Update ironrdp-viewer to parse inputs in two phases (parse_inputs + build_config) and wire clipboard backend factories into the new config.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
crates/ironrdp-viewer/src/main.rs Switch to new parsing/build flow and wire clipboard backend factory into Config.
crates/ironrdp-viewer/src/config.rs Replace PartialConfig with ParsedInputs + build_config using ConfigBuilder.
crates/ironrdp-viewer/Cargo.toml Enable new ironrdp-client feature matrix and add needed deps/features wiring.
crates/ironrdp-client/src/rdp.rs Gate imports/channel wiring behind features; refactor connection setup and optional channels.
crates/ironrdp-client/src/lib.rs Re-export PropertySet for consumers/frontends.
crates/ironrdp-client/src/config.rs Introduce ConfigBuilder, runtime feature flags, and backend override slots.
crates/ironrdp-client/Cargo.toml Remove default features; add feature matrix and optional deps.
Cargo.lock Lockfile updates for new deps (whoami, ironrdp-propertyset, ironrdp-cfg, etc.).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread crates/ironrdp-viewer/src/main.rs Outdated
Comment thread crates/ironrdp-client/src/rdp.rs Outdated
Comment thread crates/ironrdp-client/src/rdp.rs Outdated
Comment thread crates/ironrdp-client/src/rdp.rs Outdated
@CBenoit Benoît Cortier (CBenoit) changed the title feat(client): gate native backends behind Cargo features and add ConfigBuilder refactor(client): make ironrdp-client the sole owner of native backend selection Jun 29, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 16 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

crates/ironrdp-viewer/src/lib.rs:14

  • pub mod clipboard; was removed, but src/clipboard.rs still exists in the crate (and now duplicates the similarly named proxy that moved into ironrdp-client). Since the module is no longer referenced, the file is effectively dead code and can confuse future maintenance; consider deleting crates/ironrdp-viewer/src/clipboard.rs (or re-adding the module if it’s still intended to be part of the viewer API).
#![allow(clippy::cast_sign_loss)]

pub mod app;
pub mod config;

Comment thread crates/ironrdp-client/src/config.rs
@CBenoit Benoît Cortier (CBenoit) changed the title refactor(client): make ironrdp-client the sole owner of native backend selection feat(client): gate native backends behind Cargo features Jun 29, 2026
@CBenoit Benoît Cortier (CBenoit) marked this pull request as ready for review June 29, 2026 02:39
@CBenoit Benoît Cortier (CBenoit) enabled auto-merge (squash) June 29, 2026 02:51
@CBenoit Benoît Cortier (CBenoit) merged commit f7e6106 into master Jun 29, 2026
22 checks passed
@CBenoit Benoît Cortier (CBenoit) deleted the refactor/client-split branch June 29, 2026 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants